home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / srtsltn / data1.cab / Target / Samples / VBSmpl / SortSol.bas < prev    next >
Encoding:
BASIC Source File  |  1998-08-05  |  846 b   |  30 lines

  1. Attribute VB_Name = "Module1"
  2. Dim fMainForm As frmMain
  3. ' This is the callback for the Sort Solution Library
  4. Public Function MySortCallback(ByVal Code As Long, ByVal StatusData As Long, ByVal Extra As Long) As Long
  5.     Select Case Code
  6.     Case SORTSOL_NOTIFY_SORTPERCENTAGE
  7.         ' Update the sort progress bar
  8.         fMainForm.ProgressSort.Value = StatusData
  9.     
  10.     Case SORTSOL_NOTIFY_MERGEPERCENTAGE
  11.         ' Update the merge progress bar
  12.         fMainForm.ProgressMerge.Value = StatusData
  13.     End Select
  14.     
  15.     ' This statement yields the execution to the Visual Basic
  16.     ' runtime and allows the processing of all pending messages,
  17.     ' e.g. the update of the progress bars
  18.     DoEvents
  19.     
  20.     MySortCallback = 1
  21. End Function
  22.  
  23. Sub Main()
  24.     Set fMainForm = New frmMain
  25.     fMainForm.Show
  26. End Sub
  27.  
  28.  
  29.  
  30.